package com.zhuoyue.biz.core.api.dto.rep;

import com.zhuoyue.biz.core.api.domain.AppUserDO;
import lombok.Data;

/**
 * @author wjming
 * @ClassName: ChildAccountMessageRepDTO
 * @Description: 子账号信息回应
 * @Date 2021-07-02 20:24
 */
@Data
public class ChildAccountMessageRepDTO {
    /**
     * 账号
     */
    private String account;

    /**
     * 昵称
     */
    private String nickName;
    /**
     * 头像
     */
    private String imgUrl;
    private String organizationCode;

    /**
     * 子账号回应类型转换
     *
     * @param appUserDO
     * @return
     */
    public ChildAccountMessageRepDTO appUserDoToChildDto(AppUserDO appUserDO) {
        this.account = appUserDO.getAccount();
        this.nickName = appUserDO.getNickName();
        this.imgUrl = appUserDO.getImgUrl();
        this.organizationCode = appUserDO.getOrganizationCode();
        return this;
    }
}
